package cn.kgc.controller;

import cn.kgc.base.vo.OrderSpuInfoVo;
import cn.kgc.commons.annotation.AutoDict;
import cn.kgc.commons.annotation.LimitAnnotation;
import cn.kgc.commons.exception.HttpException;
import cn.kgc.commons.vo.Result;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.http.HttpStatus;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.io.Serializable;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;

/**
 * spu信息(PmsSpuInfo)表控制层
 *
 * @author makejava
 * @since 2022-12-05 09:39:25
 */
@RestController
@RequestMapping("/limit")
@Api(tags = "限流测试")
@Validated
public class LimitController {

    @GetMapping("/test")
    @ApiOperation(value = "接口限流测试",httpMethod = "GET",response = Result.class,produces = "application/json;charset=UTF-8")
    @LimitAnnotation(times = 60,limit = 2)
    public boolean limitTest(){
        return true;
    }
}
